package com.ld.security.server.user.modules.dsp.entity;

import com.ld.security.common.mybatis.anno.LabelKey;
import com.ld.security.common.mybatis.anno.LabelKeys;
import com.ld.security.common.mybatis.base.entity.*;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;


import com.ld.security.server.user.modules.dsp.constant.DspDispatchConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import com.ld.security.common.mybatis.anno.SqlKey;
import com.ld.security.common.core.base.column.*;
import com.ld.security.common.mybatis.constant.SqlCondition;

@TableName("dsp_dispatch")
@ApiModel("广告调度")
@Data
public class DspDispatchEntity  extends SuperEntity implements LabelMap
{

  @ApiModelProperty("创建人")
  @SqlKey(SqlCondition.eq)
  private String crtUser;



  @LabelKeys(value = DspSpaceEntity.class,labels = {
          @LabelKey(sourceKey = "label",targetKey = ""),
          @LabelKey(sourceKey = "code",targetKey = "spaceCode")
  })
  @ApiModelProperty("广告位编号")
  @SqlKey(SqlCondition.like)
  private String spaceId;

  @LabelKeys
  @ApiModelProperty("状态")
  @SqlKey(SqlCondition.eq)
  private DspDispatchConstant.dispStatus dispStatus;

  @LabelKeys(value = DspTacticsEntity.class)
  @ApiModelProperty("策略编号")
  @SqlKey(SqlCondition.like)
  private String tacticsId;



  @LabelKeys(value = DspAdvertEntity.class)
  @ApiModelProperty("广告编号")
  @SqlKey(SqlCondition.like)
  private String advertId;


  @ApiModelProperty("广告位编码")
  @SqlKey(SqlCondition.eq)
  private String spaceCode;

  private MapJson labelMap;

}
